Halstead complexity is about the call graph: the number of possible paths through the code.
Cyclomatic complexity is about the number of 'units of syntax' in the code, which I think is closer to what OP is asking. It uses the terms "operator" and "operand".
In the terminology typically used around parsing code, one way to measure complexity is the number of tokens. In the Halstead terminology that would be both operators and operands. https://en.wikipedia.org/wiki/Lexical_token
Comments
Clickable:
https://en.wikipedia.org/wiki/Halstead_complexity_measures
https://en.wikipedia.org/wiki/Cyclomatic_complexity
Halstead complexity is about the call graph: the number of possible paths through the code.
Cyclomatic complexity is about the number of 'units of syntax' in the code, which I think is closer to what OP is asking. It uses the terms "operator" and "operand".
In the terminology typically used around parsing code, one way to measure complexity is the number of tokens. In the Halstead terminology that would be both operators and operands. https://en.wikipedia.org/wiki/Lexical_token
Another is the number of symbols. The Wikipedia article is a little abstract: https://en.wikipedia.org/wiki/Symbol_(programming) but in the Halstead terminology would be operands.
(The following is a little hand-wavy because the definition of "symbol" varies.)
Tokens, space delimited: if ( obj . index == 0 && ( f_mode > 3 || state [ 1 ] != null ) )
Symbols: if obj index f_mode state null
versus
Tokens: if ( Membership . IsExpired )
Symbols: if Membership IsExpired