Basic - how do I?

How do I use ls and grep together to count a certain number of files in a directory?

-Thanks

ls | grep -c 'pattern'