Fixed a bug in the delta count code, fixed the data template