For testing integers you will want to use:
-eq #Is equal
-ne #Is not equal
-lt #Less than
-le #Less than or equal
-gt #Greater than
-ge #Greater than or equal
So your test statement should read:
if [ "$4" -gt 0 ];
Additionally, your if statement is missing the then so it should be corrected to:
if [ "$4" -gt 0 ]; then
See man test for more detailtest options.