You can also use COUNT.
$sql = 'SELECT COUNT(*) FROM friend_user_photo';
$query = executeQuery($sql);
This will return a single row containing the number of results. This is also a regular aggregate function so you can do joins, sub queries, conditions (WHERE), grouping and all that good stuff.
You can also treat this as just another field, so you can alias it and then use it in your joins and sub queries. You can also select additional data, for example:
$sql = 'SELECT COUNT(*), name FROM table GROUP BY name
This will return a distinct list of names, but will also contain the number of records that exist for each of those names.
Edit for alternative to count()
If you don't want to use COUNT(*) you can also use 'show table status'. For example:
$sql = "SHOW TABLE STATUS LIKE 'friend_user_photo'";
// Note, this LIKE is a regular LIKE, so wild cards can be used
This will return a row with various meta-data including Rows, but also including Key Length (in bytes) and Data Length (in bytes) as well as a lot of other data. This is also usually quite fast since it's just pulling meta-data as apposed to running an aggregate function like COUNT(*) (so long as the table isn't locked by another query that's currently running).