A unit defined by routing policy
RFC 1930 describes an AS through connected IP prefixes operated with a clearly defined routing policy. External reachability exchange matters more than a shared organizational name or location.
A large organization can operate several ASes, and one AS can include many routers and links. Its internal equipment is distinct from its external policy role.
References: [1]
Advertising and accepting routes
When A advertises a prefix to B, B separately decides whether to accept and select that information. Opposite-direction policies can differ, allowing asymmetric paths.
BGP exchanges prefixes and attributes, including AS-path information. Actual forwarding within an AS still needs concrete routes and links; an AS-level path does not enumerate every router.
Numbers and their scope
AS numbers identify participants at this routing layer. BGP extensions expanded the original two-octet space to four octets, with compatibility mechanisms for mixed deployments.
An ASN is not a domain name, account or content-trust credential. Seeing a number and an advertisement does not independently prove authorization for every advertised destination.