public int subscribe_count(final String pattern)
        throws InvalidInputException,
               TerminateException
    {
        OtpOutputStream subscribe_count = new OtpOutputStream();
        subscribe_count.write(OtpExternal.versionTag);
        final OtpErlangObject[] tuple = {new OtpErlangAtom("subscribe_count"),
                                         new OtpErlangString(pattern)};
        subscribe_count.write_any(new OtpErlangTuple(tuple));
        send(subscribe_count);
        try
        {
            return (Integer) poll_request(null, false);
        }
        catch (MessageDecodingException e)
        {
            e.printStackTrace(API.err);
            return -1;
        }
    }
public int subscribe_count(final String pattern)
        throws InvalidInputException,
               TerminateException
    {
        OtpOutputStream subscribe_count = new OtpOutputStream();
        subscribe_count.write(OtpExternal.versionTag);
        final OtpErlangObject[] tuple = {new OtpErlangAtom("subscribe_count"),
                                         new OtpErlangString(pattern)};
        subscribe_count.write_any(new OtpErlangTuple(tuple));
        send(subscribe_count);
        try
        {
            return (Integer) poll_request(null, false);
        }
        catch (MessageDecodingException e)
        {
            e.printStackTrace(API.err);
            return -1;
        }
    }
public int subscribe_count ( final String pattern ) throws InvalidInputException , TerminateException { OtpOutputStream subscribe_count = new OtpOutputStream ( ) ; subscribe_count . write ( OtpExternal . versionTag ) ; final OtpErlangObject [ ] tuple = { new OtpErlangAtom ( "subscribe_count" ) , new OtpErlangString ( pattern ) } ; subscribe_count . write_any ( new OtpErlangTuple ( tuple ) ) ; send ( subscribe_count ) ; try { return ( Integer ) poll_request ( null , false ) ; } catch ( MessageDecodingException e ) { e . printStackTrace ( API . err ) ; return - 1 ; } }
Determine how may service name pattern subscriptions have occurred.

@param  pattern     the service name pattern

@return count of active subscriptions
@throws InvalidInputException invalid input to internal function call
@throws TerminateException service execution must terminate
Determine how may service name pattern subscriptions have occurred .