#NEWLINE# @ target_required #NEWLINE# def NumTransactions( self , scope = True , target_id = None ) : #NEWLINE# #INDENT# 'Return num transactions in scope by default.' #NEWLINE# count = self . db . session . query ( models . Transaction ) . filter_by ( scope = scope , target_id = target_id ) . count ( ) #NEWLINE# return scope