get count as template variable