Installing SRAM X3 7-speed shifter with Acera derailleur : shifting stops at 4th cog I've never installed one of these trigger shifters.  Here's what I'm doing:


Acera derailleur has chain on the smallest cog.
Mount trigger shifter on handlebar with its gear set to 7.
Run cable to and then through the rear derailleur.
Pull cable taut, gently, so the barrel-end is pulled into the trigger shifter and seats itself.
Tighten derailleur cable clamp.
Pedal the bike (mounted on stand).
Shift...shift...shift...shift.


The chain moves cog by cog up to the 4th cog and then the shifter trigger won't budge any further.
SRAM shifters are generally not compatible with Shimano derailleurs. The reason is that they use different increments of cable pull per shift and derailleur actuation ratio (how far the cage moves sideways per mm of cable pulled). 

SRAM X3 7 speed shifters pull 4.5mm of cable per shift. Actuation ratio is 1:1.1 resulting in ~5mm derailleur movement.

You don't say what Acera derailleur you have. Depending on how old it is it could (nominally) be 7, 8 or 9 speed, but all Shimano MTB derailleurs 9 speed and below have an actuation ratio of 1:1.7. For 7 speed the cable pull should be 2.7mm.

Source: 
https://www.artscyclery.com/science-behind-the-magic/science-behind-the-magic-drivetrain-compatibility/

I think you probably have a several other adjustment issues - the cable is probably too slack, but the X3 shifter and Acera derailleur will not work together. Any Shimano 7 speed trigger shifter will work (because they all use the same actuation ratio).

When you get the correct shifters, use Park Tool Company's derailleur adjustment guides for (mostly) pain free setup:

https://www.parktool.com/blog/repair-help/rear-derailleur-adjustment

https://www.parktool.com/blog/repair-help/front-derailleur-adjustment