It seems as though you are checking whether or not you are on the ground each frame, and if you are not then decrease by 1 each step.
What would be better is when you jump to reduce the jump_count
variable within your jump function, and then if you have enough "jumps left" then you can jump.
# called when on floor and jump button pressed
func jump():
# reduces count by 1
jump_count -= 1
# if you have enough counts left then jump
if jump_count != 0:
motion.y = -JUMP_FORCE