The second selector in the /stats command does not work with selectors, but does work with strings/names.
To reproduce, first set up an objective and show it in the sidebar:
/scoreboard objectives add test dummy /scoreboard objectives setdisplay sidebar test
Then we can use a second selector with the command.
/scoreboard players set @p test 0 /stats entity @p set SuccessCount @p test /testfor @e
If using spigot you will now see a final score of 0, but if using vanilla you will see a larger number as the score.
To show it working with a simple string, we can do the following:
/scoreboard players set fakename test 0 /stats entity @p set SuccessCount fakename test /testfor @e
The final score will be a number larger than 0 when using spigot and in vanilla.