Try:
SELECT count(pending) AS approve FROM pending WHERE pending = '1' GROUP BY pending
You need a GROUP BY clause when you are counting rows, so figure out which field you want to GROUP BY, and change that part of the SQL statement accordingly.
P.S. If you are still getting errors, post what the error is here, so we can better help.