display borders around elements based on count