You might be able to get the top off, but you probably wouldn't have enough room to stick your hand in there to replace the flapper valve. Depending on your water, that may be awhile. Pulling the toilet to do it is kind of a pain. What you could do is cut and hinge that section of counter. That solid surface stuff is not that hard to cut, polish, and manipulate. Then, as long as it would fold back flat, you'd have plenty of room for anything that would fit underneath.