fixed single template bug and added row count on data tables