Generalised prime systems with periodic integer counting function