I have managed to get the total number of users on the system with this:
$ getent passwd | wc -l
I need the number of users on the system with a certain first name (for example 'Josh') and whose usernames start with a 'b'. How? I don't know the syntax for this.