I volunteered at my high school. Could this count as community service, considering it was volunteering?
It definitely is not considered "useful public service" as it is not on the UPS list approved by Probation and the courts. Before "volunteering" for any work, I would check with the Court, the DA, or probation to make use that they will give you credit for it.
The information provided in this answer does not create an attorney-client relationship. If you are interested in his legal services, feel free to call Chris at (303) 409-7635 at his law office in the Denver Tech Center. All initial consultations are free of charge.
General Practice Lawyer
I agree with Mr. Leroi -- useful public service is usually pre-approved by a probation officer. If your PO says this was okay, then you're good to go. If not, the hours do not count.
In no way am I offering you legal advice, and in no way has my comment created an attorney-client relationship. You are not to rely upon my note above in any way, but insted need to sit down with counsel and share all relevant facts before receiving fully-informed legal advice. If you want to be completely sure of your rights, you must sit down with an experienced criminal defense attorney to be fully aware of your rights.
Criminal Defense Attorney
I also agree that it must be preapproved and on the list of authorized agencies for which you can serve useful public service. Since you have already done the hours, you can ask if they will give you credit, no harm in trying! But you will likely be told you will not receive credit.