Doesn't want to go alone

Patch • First they`re sour then they`re sweet.
My 4 year old refuses to go to the bathroom alone. Idk what to do anymore. She's been like this for months... I can't keep going in there with her every single time she needs to use the restroom. She was doing better for about a week, she would go alone if I counted to see how long it took. Like a race. Now she refuses again. She's getting ready to start kindergarten & she cannot keep this up anymore. I've tried talking to her several times about it & asking her what she's so afraid of! She says "I don't want to tell you." She says that for a lot of stuff. I just don't know what to do anymore. Right now she's crying at the end of the bed because I won't go in there with her.