Bug counts on project show and index

That seems like a really odd thing to do for a few reasons.
1) Why are we getting a single element of undefined?
2) Why not return 0 or null instead of -1 (so that if we try to add it to something else later we don't get an incorrect answer)?