Added counts table to homepage, supporting functions to entities_controller.rb