Both $InboundLinkCount and $OutboundLinkCount include 'prototype' link type links but this is not generally the user's expectation.
For any note with a prototype set, the true inbound count is $InboundLinkCount - 1
.
For any prototype, the true outbound link count is count(links().outbound..$Name)
As a side note, Roadmap view includes 'prototype' link type links.
Assuming two Number-type attributes $TrueInboundCount and $TrueOutboundCount, a rule or agent action might apply this logic:
if($Prototype){$TrueInboundCount=($InboundLinkCount-1)}else{$TrueInboundCount=$InboundLinkCount};
if($IsPrototype){$TrueOutboundCount=count(links().outbound..$Name)}else{$TrueOutboundCount=$OutboundLinkCount};