Update forum/class/board.php

optimized code to get counts, and otherwise reducing the over-use of expensive operations.