count shifts modified in order to be easily used in template