Control PC Fan Speed via serial monitor (or software in general)? New to Arduino

Hi everyone...

I'm trying to figure out how to control speed (rpm) of a pc fan through the serial monitor but I'm not sure if it's possible or how to code that....new to arduino!

I followed this schematics:

And i got this:

Using the example code, it's reading around 300rpm....is it possible to control that via softwarE?

Thanks in advance!

-Antonio