Taking the Q10 (or Q10 Limited) bus from Terminal 4 -- as suggested by B2G -- will not only be cheaper than the AirTrain/subway combination, but it will almost certainly be faster. From Terminal 4 to Lefferts and Liberty, the trip time is about 25 minutes, and the buses run frequently. You can get from Terminal 3 to Terminal 4 for free by riding a Jamaica- or Howard Beach-bound AirTrain one stop. (There is no charge for AirTrain travel wholly within the airport.)
Taking the Q10 (or Q10