Button still press for up-counting

"still counter going up until I release "

while( buttonIsPushed )
{
counter = counter + 1;
}