I know someone else answered already, but I will answer in more detail.
we can write a simple equation to find out the answer mathematically.
8 (number of marbles left) = m (marbles before) - 5
(8=m-5)
add 5 to each side and you will get
m = 13
so, maya started with 13 marbles