Finally fixed all this, hope the DB is fine, at least no error. Removed count calculation against hand written value