PHP - How can I count the number of rows in table and echo the result to the web page?

I am telling the user how many messages in their inbox are new, but don't know how to count the table rows and output the results.

The details needed are shown below.

user id = $user and Status = 1

user id defines which user to look up, and the 1 indicates the message is new. Both values must be checked and counted in order to show new messages for that user. Thanks!
 
Back
Top