Let\'s say I have the following table structure:
t1
-------------
id // row id
userID_follower // this user is a follows another member
userID_following //
I recommend returning two rows with one count on each row, instead of two columns:
SELECT 'follower', COUNT(*) AS count FROM t1 WHERE userID_follower = ?
UNION ALL
SELECT 'following', COUNT(*) FROM t1 WHERE userID_following = ?
This may seem like a degenerate solution, but the reason is that if userID_follower and userID_following are indexed, this can utilize the indexes. If you try to get the results in two columns as shown in the other answers, the can't use the indexes and has to do a table-scan.
Other tips that are tangential to the question: