Hello Ei Shwe Zin :)
Space can be used in both countable and non-countable ways. "There's still some space in the living room," is a non-countable example.
On the other hand, space in the sense of, e.g. a parking space is countable:
"You can go out and count that there are 5 empty spaces."
So whether space is countable depends on whether it is used to refer to some undetermined area or volume, or whether it is used to refer to a specific designated block of space.
We see a similar example of countable and non-countable when speaking of space on a page:
"There was some empty space at the bottom of the page." (non-countable) vs. "Type only one space (not two) after each period."
Hope, it was helpful.
Best regards,
Anastasiia